package com.jclazz.jweb.codegen.common;

import java.util.HashMap;
import java.util.Map;

public class DataMapping {
    public static Map<String, String> javaTypeMap = new HashMap<String, String>();

    static {
        initJavaTypeMap();
    }

    /**
     * 返回状态映射
     */
    public static void initJavaTypeMap() {
        javaTypeMap.put("tinyint" , "Integer");
        javaTypeMap.put("smallint" , "Integer");
        javaTypeMap.put("mediumint" , "Integer");
        javaTypeMap.put("int" , "Integer");
        javaTypeMap.put("integer" , "integer");
        javaTypeMap.put("bigint" , "Long");
        javaTypeMap.put("float" , "Float");
        javaTypeMap.put("double" , "Double");
        javaTypeMap.put("decimal" , "BigDecimal");
        javaTypeMap.put("bit" , "Boolean");
        javaTypeMap.put("char" , "String");
        javaTypeMap.put("varchar" , "String");
        javaTypeMap.put("tinytext" , "String");
        javaTypeMap.put("text" , "String");
        javaTypeMap.put("mediumtext" , "String");
        javaTypeMap.put("longtext" , "String");
        javaTypeMap.put("time" , "Date");
        javaTypeMap.put("date" , "Date");
        javaTypeMap.put("datetime" , "Date");
        javaTypeMap.put("timestamp" , "Date");
    }
}
